package control;

import gui.CameraPanel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * Controller class for the gui, only function is to exit the program.
 */

public class ExitControl {
	/**
	 * 
	 * @param cameraPanel
	 *            which view should be terminated.
	 */

	public ExitControl(CameraPanel cameraPanel) {
		cameraPanel.addExitListener(new ExitListener());
	}

	public class ExitListener implements ActionListener {
		@Override
		public void actionPerformed(ActionEvent e) {
			System.exit(0);

		}

	}
}
